"""


"""
from rest_framework import serializers

from orders.models import OrderInfo, OrderGoods, SKU


class OrderSerializer(serializers.ModelSerializer):
    class Meta:
        model = OrderInfo
        fields = "__all__"


class SKU_Serializer(serializers.ModelSerializer):
    class Meta:
        model = SKU
        fields = ("name", "default_image_url")


class SKUS_Serialier(serializers.ModelSerializer):
    sku = SKU_Serializer(read_only=True)

    class Meta:
        model = OrderGoods
        fields = "__all__"


class OrderDetailSerializer(serializers.ModelSerializer):
    skus = SKUS_Serialier(read_only=True, many=True)

    class Meta:
        model = OrderInfo
        fields = "__all__"


class OrderDetailStatusSerializer(serializers.ModelSerializer):

    class Meta:
        model = OrderInfo
        fields = ("status", )